package com.hxkj.service;

import com.hxkj.domain.po.AllocationSite;
import com.hxkj.domain.po.AuthUser;
import com.hxkj.domain.po.Site;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import com.platform.common.domain.to.PageTo;

import java.util.List;

/**
 * 站点Service
 * <p>
 * Created by zhuzhengxin on 2018/5/19.   List<Site>
 */
public interface SiteService {

    /**
     * @param site
     * @return
     * @throws Exception
     */
    ResultPageStruct<Site> getSiteList(Site site, PageTo pageParam) throws Exception;
    /**
     * @param
     * @return
     * @throws Exception
     */
    List<Site> getSwitcherList(Site site) throws Exception;

    /**
     * @param site
     * @return
     * @throws Exception
     */
    Site getSiteFromCache(Site site) throws Exception;


    /**
     * 更新用户缓存
     * @param site
     */
    ResultMessageStruct updateSite(Site site)throws Exception;

    /**
     * 删除用户缓存
     * @param site
     */
    ResultMessageStruct deleteSite(Site site)throws Exception;

    /**
     * 增加站点
     * @param site
     */
    ResultMessageStruct saveSite(Site site)throws Exception;


    /**
     * 从缓存中获取数据
     * @param siteId
     * @return
     * @throws Exception
     */
    Site getSiteRefresh(Long siteId) throws Exception;

   /**
   * @author Mr.zheng
   * @Description saveUserSite 添加删除修改用户管理站点
   * @Date 19:36 2018/5/21
   * @Param [uid, siteIds] 用户uid和站点Id拼接字符串
   * @return int
   **/
   ResultMessageStruct saveUserSite(AuthUser authUser) throws Exception;

    /**
    * @author Mr.zheng
    * @Description getUserSiteList 根据用户ID获取其管理的站点
    * @Date 17:48 2018/5/21
    * @Param [uid]
    * @return com.github.pagehelper.PageInfo
    **/
    AllocationSite getUserSiteList(AuthUser authUser) throws Exception;

    /**
     * 站点排序
     * @param site
     */
    ResultMessageStruct SiteSort(Site site)throws Exception;

}
